statusListForM = function(){
	var statusStore = Ext.create('Ext.data.Store',{
	      //  xtype: 'Ext.data.Store',
	        singleton : true,
	        proxy:{ 
	        	type:'ajax',
	        	url: 'publicDictAction.action' ,      
	        	reader: { 
	        		type: 'json', 
	        		root: 'list' 
	        	},
	        	extraParams:{
	        		publicCode:'prom'
	        	}
	        },
	        fields:['valueId','valueName'],
	        //autoLoad: true,
	    });
	
	Ext.define('systemParamModel',{
			extend:'Ext.data.Model',
			fields:[
			        	{name:'paramId',type:'String'},
			        	{name:'statusValueId',mapping:'value.valueId',type:'String'},
			        	{name:'statusValueName',mapping:'value.valueName',type:'String'},
			        	{name:'valueName',type:'string'},
			        	{name:'publicCode',type:'string'}
				       ]
		});
	var systemParamstore = Ext.create('Ext.data.Store',{
		model:systemParamModel,
		autoLoad:true,
		proxy:{
			type:'ajax',
			url:'selectStatusAction.action',
			reader:{
				type:'json',
				root:'systemParamList'
			},
		}
	});
	var grid = Ext.create('Ext.grid.GridPanel',{
		store:systemParamstore,	
		columnLines:true,
	//	selModel:checkBox,
		disableSelection:false,
		loadMask:true,
		columns:[
		         {text:'参数编号',width:150,dataIndex:'paramId',sortable:true},
		         {text:'当前值',width:200,dataIndex:'statusValueId',hidden:true},
		         {text:'当前',width:200,dataIndex:'statusValueName'},
		         {text:'参数名称',width:200,dataIndex:'valueName'},
		         {text:'',width:200,dataIndex:'publicCode',hidden:true}
		         ],
		autoHeight:true,
		authWidth:true,

		title:"参数配置信息",
		loadMask:true,
		dockedItems:[{
			dock:'top',
			xtype:'toolbar'	
					
		},{
			dock:'bottom',
			xtype:'label',
			html:'<div style="font-size:12px;color:red">1.双击可进行单行编辑</div>'
		}],
		listeners:
	    {
	        'itemdblclick': function(dataview, record, item, index, e) {
	        	if(record.get("paramId") == 1){
	        		statusStore.proxy.extraParams.publicCode="status";
	        	}
	        	else{
	        		statusStore.proxy.extraParams.publicCode="prom";
	        	}
	        	statusStore.load();
	        	newWindow(record);
	        	}    //单击击事件
	        }
	});
	function newWindow(record){
		var editSystemParam = Ext.create('Ext.Window',{
			id:'editStatusId',
			layout:'form',
			width:400,
			height:200,
			//closeAction:'hide',
			plain:true,
			resizable : false,
			title:'参数信息',
			items:[{
				xtype:'textfield',
				fieldLabel:'参数编号',
				id:'paramId',
				name:'paramId',
				hidden:true,
				listeners: {
		               'afterrender': function () {
		            	   //Ext.Msg.alert("ss",record);
		                   if (record!=null){
		                	   this.setValue(record.get('paramId'));
		                   }
		               }
		           }
			},{
				xtype:'combobox',
				id:'promBoxId',
		    	alias:'widget.lifechannelCombo',
		        width: 200,
		        fieldLabel: '请选择当前学年',
		        store: statusStore,
		        displayField: 'valueName',
		        valueField: 'valueId',
		        triggerAction: 'all',
		        emptyText: '请选择...',
		        blankText: '请选择当前学年',        
		        queryMode:'local',
		        listeners: {
		               'afterrender': function () {
		            	   //Ext.Msg.alert("ss",record);
		                   if (record!=null){
		                	   this.setValue(record.get('statusValueId'));
		                   }
		               }
		           }
				}],
			buttons : [ {
				xtype : "button",
				text : "保存",
				pressed : false,
				handler : validatorData
			}
			
			],
		buttonAlign : "center",
		plain:true
			
		});
		editSystemParam.show();
	}
	function validatorData(){ 
		var valueId = Ext.getCmp('promBoxId').value;
		var paramId = Ext.getCmp('paramId').value;

		var jsonString="{'valueId':"+"'"+valueId+"'"
		+",'paramId':"+"'"+paramId+"'"
		+"}";
		Ext.Ajax.request({  
	        url : "updateStatusAction.action",  
	        params : {  
	        	paramId : paramId,
	        	valueId : valueId
	        },  
	        method : 'POST',  
	        success : function(response, opts) {  
	            var obj = Ext.decode(response.responseText);  
	            // 当后台数据同步成功时  
	            if (obj.success) {  
	            	Ext.getCmp('editStatusId').close();
	            	systemParamstore.load();
	            	Ext.Msg.alert("提示","操作成功");
	            } else {  
	            	Ext.Msg.alert("提示","操作失败");
	            }  
	        }  
	    });  
	}

	return grid;
};